package com.example.mapping.sevice;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapping.constant.Constants;
import com.example.mapping.domain.Rule;
import com.example.mapping.mapper.RuleMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author baoyoujia
 */
@Service
public class RuleService extends ServiceImpl<RuleMapper, Rule> {

    public List<Rule> getRuleByIds(List<Long> ruleIds) {
        LambdaQueryWrapper<Rule> ruleLambdaQueryWrapper = new LambdaQueryWrapper<Rule>().in(Rule::getId, ruleIds).in(Rule::getSysDelete, Constants.Number.INT_0, Constants.Number.INT_1);
        return list(ruleLambdaQueryWrapper);
    }
}
